<?php
/*
 * Created on 04.01.2006
 *
 */

class h_hiddenHandler 
{

    function startElement (& $sender, $attrs)
    {
        $form = $sender->topParent();
        if (!$attrs['name'])
        {
            die ("Attribute name is missing in hidden tag\n");
        }
        if (!$attrs['value'])
        {
            die ("Attribute value is missing in hidden tag\n");
        }
        $sender->appendCode('$out->write("<input type=\\"hidden\\" name=\\"".'.$attrs['name']
            .'."\\" value=\\"".'.$attrs['value'].'."\\"/>");'."\n");
        $sender->addFormField(substr($form['name'], 1, -1), substr($attrs['name'], 1, -1));
    }
    
    function endElement (& $sender)
    {
    }

}

?>